package com.chengliang0315.locationtest;

import android.app.Service;
import android.content.Intent;
import android.location.Location;
import android.os.IBinder;
import android.widget.Toast;

import com.chengliang0315.locationtest.util.LogUtils;
import com.chengliang0315.locationtest.util.location.GPSLocation;


public class LocationService extends Service {

    private GPSLocation gpsLocation; //GPS定位

    public LocationService() {
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        gpsLocation = GPSLocation.getInstance(getApplication());
        LogUtils.d(gpsLocation.isOpenGPS()+"");
        if (!gpsLocation.isOpenGPS()){
            Toast.makeText(this,"请打开GPS过的更好的服务",Toast.LENGTH_LONG).show();
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        return super.onStartCommand(intent, flags, startId);
    }

}
